package com.kandinfo.base.admin.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;

import com.kandinfo.base.admin.domain.UserGroup;
import com.kandinfo.base.common.repository.BaseRepository;



/**
* Class Name: UserGroupRepository
* Description: 用户群组
* @author wandongwang
*
*/
public interface UserGroupRepository extends BaseRepository<UserGroup,Long> {
    @Query(value = "select * from user_group where group_id = ?1", nativeQuery = true)
    List<UserGroup> findByGroupId(Long id);
    
    @Query(value = "select * from user_group where user_id = ?1", nativeQuery = true)
    List<UserGroup> findByUserId(Long id);
}